home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-21 / qwhite.zip / BUFFERS.TEC < prev    next >
Text File  |  1992-03-09  |  8KB  |  174 lines

  1. ID:BF BUFFERS
  2. Quarterdeck Technical Bulletin #226
  3. by Russell Bell
  4. Last Revision:  7 February 1992
  5.  
  6.      The purpose of this document is to discuss the function of DOS BUFFERS, 
  7. how DOS allocates them, and how the Quarterdeck memory managers (QEMM-386 and 
  8. QEMM 50/60) and the memory enhancer, QRAM, deal with BUFFERS.
  9.  
  10. What is a BUFFER?
  11.  
  12.       A BUFFER is a portion of memory that DOS sets aside for buffering disk 
  13. I/O.  DOS stores directories and partial blocks here.  DOS must read a full 
  14. sector of information from the disk.  If the application asks for an amount of 
  15. information that is not an exact multiple of the sector size then the whole 
  16. sector must be stored somewhere while DOS gives the partial amount asked for 
  17. to the application that asked for it.  DOS uses BUFFERS to store directories 
  18. because it needs somewhere to store information for its own use.
  19.  
  20. Where are the BUFFERS?
  21.  
  22.      DOS keeps one BUFFER in the kernel to make sure that it has at least one 
  23. at all times.  The rest are loaded as "Added Data" and may be seen on the 
  24. "DOS/Overview" page of MANIFEST.
  25.  
  26. How big are BUFFERS?
  27.  
  28.      Each BUFFER takes 528 bytes unless you are using DOS version 2.x or 3.x 
  29. and you are using a third-party disk manager (like On-Track's "Disk Manager") 
  30. to create logical partition(s) larger than 32 MB.  In this case, the size of 
  31. each BUFFER doubles (to 1056 bytes) for partitions between 33-64 MB, doubles 
  32. again (to 2112 bytes) for partitions between 65-128 MB, and again (to 4224 
  33. bytes) for partitions between 128-256 MB, and so on.  This is because in these 
  34. versions of DOS the size of the BUFFER must follow the size of the sector; the 
  35. third-party disk partitioners double the size of the sector as needed.  You 
  36. can see how big your BUFFERS by looking at the "DOS/Overview" page of MANIFEST 
  37. and seeing how much memory your BUFFERS take. 
  38.      In DOS 4.x and 5.x the size of each BUFFER is fixed at 528 bytes.
  39.  
  40. How many BUFFERS do I need?
  41.  
  42.      You only need one BUFFER.  Any program that claims it needs more is 
  43. really only making a recommendation.  Of course, your system will probably run 
  44. slower if you have only one BUFFER, but no more than one is actually needed to 
  45. operate.  You should consult the DOS manual for suggestions about how many 
  46. BUFFERS you should have.  
  47.      Disk caches may perform some of the same services that DOS BUFFERS 
  48. perform.  If you use a disk cache you should consult the recommendation of the 
  49. authors of the disk cache when deciding how many BUFFERS to allocate. 
  50.      BUFFERS is actually an area of ram which is available for buffering disk 
  51. I/O; they are not used by the count. If you want 20 BUFFERS, what you really 
  52. mean is that you want 10KB of disk buffering.  If your BUFFERS are larger than 
  53. 528 bytes (see paragraph above, "How big are BUFFERS") then you should 
  54. decrease the number of BUFFERS to get the same amount of buffering. 
  55.  
  56. What do QEMM-386, QEMM 50/60, and QRAM allow me to do with BUFFERS? 
  57.  
  58.      QEMM-386, QEMM 50/60, and QRAM allow BUFFERS (with the exception of the 
  59. first BUFFER) to be moved to high RAM with DOS versions 2.x, 3.x, and 5.x.  
  60. Quarterdeck does this with a program called BUFFERS.COM, which loads BUFFERS 
  61. at the DOS prompt and can be loaded high with Quarterdeck's LOADHI.COM.  See 
  62. the "The DOS Resources Programs" chapters in the QEMM -386, QEMM-50/60, or 
  63. QRAM manuals.  Note that Quarterdeck's OPTIMIZE program will decrease the 
  64. BUFFERS=?? statement from your original CONFIG.SYS to BUFFERS=1 on DOS 2 and 3 
  65. systems because DOS will allocate more than one BUFFER by default when no 
  66. BUFFERS statement exists in the CONFIG.SYS.
  67.  
  68. What if I have DOS 4.x? 
  69.  
  70.      Microsoft changed the structure of BUFFERS in version 4.x of DOS.  At the 
  71. same time Microsoft made it possible to move the BUFFERS into Expanded memory.  
  72. Since it is a more efficient use of memory to put BUFFERS into Expanded memory 
  73. than to load them high Quarterdeck did not change its BUFFERS.COM program to 
  74. accommodate DOS version 4.x.  This feature of DOS is invoked with the "/x" 
  75. switch (BUFFERS=30/X, for example).  Note that when BUFFERS are put into 
  76. Expanded memory they are allocated in multiples of 30, with a minimum of 30.  
  77. This is because Expanded memory can be used in increments of 16 kilobytes 
  78. only.  16 kilobytes can allocate 30 BUFFERS.  If you use "BUFFERS=20/X" you 
  79. will get 30 BUFFERS; if you use "BUFFERS=40/X" you will get 60 BUFFERS.
  80.      The /X parameter has proved to cause problems with many programs and 
  81. users who have problems when they put the BUFFERS into expanded memory with 
  82. this switch should stop doing so.   
  83.      Note that third party disk partitioners are not necessary with version 
  84. 4.x of DOS and the size of each BUFFER does not change with the size of the 
  85. largest disk partition.  
  86.  
  87. What if I have DOS 5.x?
  88.  
  89.      Microsoft changed the structure of BUFFERS again with version 5.  The 
  90. BUFFERS can no longer be loaded into expanded memory.  If you use the DOS=HIGH 
  91. statement in the config.sys then the BUFFERS are loaded into the HMA along 
  92. with part of DOS's code.  The BUFFERS cannot be broken up, part in the HMA, 
  93. part low.  If you ask for more than will fit into the HMA all of them will 
  94. load low. 
  95.      Beginning with version 6 of QEMM-386, version 6 of QEMM-50/60, and 
  96. version 2 of QRAM, BUFFERS.COM works with DOS 5.
  97.      BUFFERS in DOS 5 are "brittle":  only those BUFFERS loaded into a single 
  98. contiguous piece of memory can be used.  If you load BUFFERS into more than 
  99. one place, only the last BUFFERS are used, the previously loaded ones are 
  100. wasted.  So if you load BUFFERS into the HMA (which happens with all BUFFERS 
  101. loaded in the config.sys when you use DOS=HIGH and there is room in the HMA 
  102. for all requested), then use BUFFERS.COM to load additional BUFFERS, the 
  103. BUFFERS in the HMA are not used.
  104.  
  105.      48 BUFFERS can fit into the HMA with the DOS kernel when HIMEM.SYS is 
  106. used.  When QEMM-386 is used, 51 BUFFERS can fit into the HMA with the DOS 
  107. kernel.  Note that if you have some other HMA user loaded, in addition to the 
  108. DOS kernel, that there will not be room for this many BUFFERS.  The Microsoft 
  109. Mouse Driver version 8.10 has the capability to load part of itself into the 
  110. HMA (only when DOS=HIGH is used), using about 13K of the HMA, displacing about 
  111. 25 BUFFERS worth of room.      
  112.      Third-party disk partitioners are not necessary to create partitions 
  113. larger than 32MB and the size of each BUFFER is constant in DOS 5.
  114.  
  115. What about Compaq DOS 3.31? 
  116.  
  117.      Compaq DOS 3.31, like DOS 4, allows partitions of the hard disk larger 
  118. than 32 MB without a third-party partitioning program and without increasing 
  119. the size of a BUFFER.
  120.  
  121. TROUBLESHOOTING
  122.  
  123. My system is running very slowly.
  124.  
  125.      If your system seems to be running slowly after running Quarterdeck's 
  126. OPTIMIZE program, make sure that you have enough BUFFERS. You can see how many 
  127. you have by looking the "DOS/Overview" page of MANIFEST.
  128.  
  129. Quarterdeck tells me that I need to have version 2.x, 3.x, or 5.x of DOS in 
  130. order to load BUFFERS high.
  131.  
  132.      This is indeed the case.  See "What if I have DOS 4.x?" and "What if I 
  133. have DOS 5.x?"
  134.  
  135. I seem to be losing a lot of memory somewhere.
  136.  
  137.      If you have DOS version 2.x or 3.x (but not Compaq DOS 3.31) and you are 
  138. using a third-party disk partitioning program then the size of the individual 
  139. BUFFER is increased to match the size of the sector. You may want to decrease 
  140. the number of BUFFERS you allocate.  See the paragraphs "How big are BUFFERS?" 
  141. and "How many BUFFERS do I need?" above.
  142.  
  143.   ************************************************************************
  144.   *This technical note may be copied and distributed freely as long as it*
  145.   *is distributed in its entirety and it is not distributed for profit.  *
  146.   *         Copyright (C) 1990-2 by Quarterdeck Office Systems           *
  147.   ************************ E N D   O F   F I L E *************************
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.